<!DOCTYPE html>
<html lang="en-US">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>H5笔记 | 老李的个人博客</title>
    <meta name="description" content="老李的个人网站，记录着自己的个人成长。">
    <link rel="icon" href="/logo.jpg">
    
    <link rel="preload" href="/assets/css/0.styles.1db6e86b.css" as="style"><link rel="preload" href="/assets/js/app.9a5f4f15.js" as="script"><link rel="preload" href="/assets/js/2.fb839ad7.js" as="script"><link rel="preload" href="/assets/js/10.3edf41db.js" as="script"><link rel="prefetch" href="/assets/js/11.7ba525f6.js"><link rel="prefetch" href="/assets/js/12.bf9d74b3.js"><link rel="prefetch" href="/assets/js/13.b1401722.js"><link rel="prefetch" href="/assets/js/14.35ef07af.js"><link rel="prefetch" href="/assets/js/15.ffbfdd10.js"><link rel="prefetch" href="/assets/js/3.ce5bc181.js"><link rel="prefetch" href="/assets/js/4.76416af2.js"><link rel="prefetch" href="/assets/js/5.1b1ec201.js"><link rel="prefetch" href="/assets/js/6.529193cc.js"><link rel="prefetch" href="/assets/js/7.efd2306a.js"><link rel="prefetch" href="/assets/js/8.92fb4af1.js"><link rel="prefetch" href="/assets/js/9.548be40e.js">
    <link rel="stylesheet" href="/assets/css/0.styles.1db6e86b.css">
  </head>
  <body>
    <div id="app" data-server-rendered="true"><div class="theme-container"><header class="navbar"><div class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/" class="home-link router-link-active"><!----> <span class="site-name">老李的个人博客</span></a> <div class="links"><div class="search-box"><input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links can-hide"><div class="nav-item"><div class="dropdown-wrapper"><a class="dropdown-title"><span class="title">算法学习网站</span> <span class="arrow right"></span></a> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="https://leetcode-cn.com/problemset/all/" target="_blank" rel="noopener noreferrer" class="nav-link external">
  力扣
  <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></div></div><div class="nav-item"><a href="https://www.runoob.com" target="_blank" rel="noopener noreferrer" class="nav-link external">
  菜鸟教程
  <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="nav-item"><div class="dropdown-wrapper"><a class="dropdown-title"><span class="title">Python</span> <span class="arrow right"></span></a> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/blog/Django/" class="nav-link">Django</a></li><li class="dropdown-item"><!----> <a href="/blog/HTML/" class="nav-link">HTML</a></li><li class="dropdown-item"><!----> <a href="/blog/Python/" class="nav-link">Pthon</a></li></ul></div></div> <!----></nav></div></header> <div class="sidebar-mask"></div> <aside class="sidebar"><nav class="nav-links"><div class="nav-item"><div class="dropdown-wrapper"><a class="dropdown-title"><span class="title">算法学习网站</span> <span class="arrow right"></span></a> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="https://leetcode-cn.com/problemset/all/" target="_blank" rel="noopener noreferrer" class="nav-link external">
  力扣
  <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></div></div><div class="nav-item"><a href="https://www.runoob.com" target="_blank" rel="noopener noreferrer" class="nav-link external">
  菜鸟教程
  <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="nav-item"><div class="dropdown-wrapper"><a class="dropdown-title"><span class="title">Python</span> <span class="arrow right"></span></a> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/blog/Django/" class="nav-link">Django</a></li><li class="dropdown-item"><!----> <a href="/blog/HTML/" class="nav-link">HTML</a></li><li class="dropdown-item"><!----> <a href="/blog/Python/" class="nav-link">Pthon</a></li></ul></div></div> <!----></nav>  <ul class="sidebar-links"><li><section class="sidebar-group depth-0"><p class="sidebar-heading open"><span>H5笔记</span> <!----></p> <ul class="sidebar-links sidebar-group-items"><li><a href="/blog/html/#标签" class="sidebar-link">标签</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/blog/html/#video-视频" class="sidebar-link">video 视频</a></li><li class="sidebar-sub-header"><a href="/blog/html/#audio-音频" class="sidebar-link">audio 音频</a></li><li class="sidebar-sub-header"><a href="/blog/html/#html5-新的-input-类型" class="sidebar-link">HTML5 新的 Input 类型</a></li></ul></li></ul></section></li></ul> </aside> <main class="page"> <div class="theme-default-content content__default"><h1 id="h5笔记"><a href="#h5笔记" aria-hidden="true" class="header-anchor">#</a> H5笔记</h1> <h2 id="标签"><a href="#标签" aria-hidden="true" class="header-anchor">#</a> 标签</h2> <h3 id="video-视频"><a href="#video-视频" aria-hidden="true" class="header-anchor">#</a> video 视频</h3> <div class="language-html extra-class"><pre class="language-html"><code><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>video</span> <span class="token attr-name">width</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>320<span class="token punctuation">&quot;</span></span> <span class="token attr-name">height</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>240<span class="token punctuation">&quot;</span></span> <span class="token attr-name">controls</span><span class="token punctuation">&gt;</span></span>
  <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>source</span> <span class="token attr-name">src</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>movie.mp4<span class="token punctuation">&quot;</span></span> <span class="token attr-name">type</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>video/mp4<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>
  <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>source</span> <span class="token attr-name">src</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>movie.ogg<span class="token punctuation">&quot;</span></span> <span class="token attr-name">type</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>video/ogg<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>
  您的浏览器不支持 HTML5 video 标签。
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>video</span><span class="token punctuation">&gt;</span></span>
</code></pre></div><p>可以用加上去调用钙元素对象的方法和属性来控制</p> <h3 id="audio-音频"><a href="#audio-音频" aria-hidden="true" class="header-anchor">#</a> audio 音频</h3> <div class="language-html extra-class"><pre class="language-html"><code><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>audio</span> <span class="token attr-name">controls</span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>source</span> <span class="token attr-name">src</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>horse.ogg<span class="token punctuation">&quot;</span></span> <span class="token attr-name">type</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>audio/ogg<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>source</span> <span class="token attr-name">src</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>horse.mp3<span class="token punctuation">&quot;</span></span> <span class="token attr-name">type</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>audio/mpeg<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>
    您的浏览器不支持 audio 元素。
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>audio</span><span class="token punctuation">&gt;</span></span>
</code></pre></div><h3 id="html5-新的-input-类型"><a href="#html5-新的-input-类型" aria-hidden="true" class="header-anchor">#</a> HTML5 新的 Input 类型</h3> <ol><li>color</li> <li>date 日期精确到日</li> <li>datetime 日期（UTC 时间）</li> <li>datetime-local 咩有时区的时间</li> <li>emai</li> <li>lmonth</li> <li>number</li> <li>range</li></ol> <div class="language-html extra-class"><pre class="language-html"><code><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>input</span> <span class="token attr-name">type</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>range<span class="token punctuation">&quot;</span></span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>points<span class="token punctuation">&quot;</span></span> <span class="token attr-name">min</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>1<span class="token punctuation">&quot;</span></span> <span class="token attr-name">max</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>10<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>
</code></pre></div><ul><li>max - 规定允许的最大值</li> <li>min - 规定允许的最小值</li> <li>step - 规定合法的数字间隔</li></ul> <ol start="9"><li>search</li> <li>tel</li> <li>time</li> <li>url</li> <li>week</li></ol> <table><thead><tr><th>属性</th> <th>描述</th></tr></thead> <tbody><tr><td>max</td> <td>规定允许的最大值</td></tr> <tr><td>min</td> <td>规定允许的最小值</td></tr> <tr><td>required</td> <td>规定输入字段的值是必需的</td></tr> <tr><td>step</td> <td>规定输入字段的默认值</td></tr></tbody></table></div> <footer class="page-edit"><!----> <!----></footer> <!----> </main></div><div class="global-ui"></div></div>
    <script src="/assets/js/app.9a5f4f15.js" defer></script><script src="/assets/js/2.fb839ad7.js" defer></script><script src="/assets/js/10.3edf41db.js" defer></script>
  </body>
</html>
